.main-header {
    background-color: var(--header);
    border-bottom: 1px solid var(--btn);
    position: sticky;
    top: 0;
    z-index: 110;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* direction: rtl; */
}

.logo-area {
    display: none;
    align-items: center;
    height: 110;
    font-size: 2.0rem;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    /* background: linear-gradient(40deg, #622dbc, #df3295); */
    /* background: linear-gradient(90deg, #db3535, #e924df, #2724e9, #24d2e9); */
    /* -webkit-background-clip: text; */
    /* -webkit-text-fill-color: transparent; */

}

.accent-text {
    color: var(--btn);
    background: linear-gradient(45deg, var(--btn), var(--btn1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-item {
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links li {
    list-style-type: none;
    padding: 0 10px;

}

.nav-links li a,
.nav-links li i {
    font-size: 16;
    text-decoration: none;
    padding: 10px 0;
    position: relative;
    display: block;
    color: var(--text);

}

.nav-links li a::after {
    content: "";
    background-color: var(--btn);
    width: 0;
    height: 2px;
    position: absolute;
    left: 0;
    bottom: 0;
    transition: all 0.3s linear;
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-links li.active a::after {
    width: 100%;
}

.nav-links li.with-submenu {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.nav-links li.with-submenu .submenu {
    width: 200;
    height: auto;
    position: absolute;
    /* display: flex; */
    left: 50%;
    top: 100%;
    background: var(--iconEmoji4);
    /* background: red; */
    border-radius: 20px;
    border-radius: 0 0px 20px 20px;
    transform: translateX(-50%);
    overflow: hidden;
    display: none;
    transition: all 0.5s ease-in-out;
}

.nav-links li.with-submenu .o {
    display: flex;
    transition: all 0.5s ease-in-out;
}

.submenu li a {
    width: 100%;
    margin: 10 0;
}

.submenu .submenu-inner {
    width: 95%;
}

.nav-item:hover,
.nav-item.active {
    /* color: var(--icon1); */
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-text {
    color: var(--text);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 10;
}

.btn-primary {
    background: linear-gradient(135deg, var(--btn), var(--icon1));
    color: var(--text);
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    /* box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4); */
}



.btn-primary:hover {
    transform: translateY(-2px);
    /* box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6); */
}


.auth-box,
.user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.btn-demo-login {
    background-color: #6366f1;
    color: var(--text);
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

/* تنسيق صورة جوجل */
.demo-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #6366f1;
}

/* تنسيق دائرة الحرف (بدون استهلاك مساحة Storage) */
.demo-avatar-letter {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    color: var(--text);
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.demo-user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.btn-demo-logout {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.btn-demo-logout:hover {
    background-color: #dc2626;
}

/* زر الهيدر */
.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
}

.user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

#main-sidebarm {
    display: none;
}


@media (min-width: 700px) and (max-width: 1120px) {
    .main-header {
        top: 0;
    }

    .header-container {
        max-width: 100%;
    }

    .logo-area {
        font-size: 1.5rem !important;
        font-weight: 700;
    }

    [lang="ar"] .logo-area {
        margin: 0 10;
    }

    .nav-links {
        gap: 0px;
    }

    .nav-item {
        font-size: 0.6rem !important;
    }

    [lang="ar"] .nav-item {
        font-size: 0.8rem !important;
    }

    .auth-buttons {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .btn-text {
        font-size: 0.7rem !important;
        font-weight: 500;
        margin: 0 0;
    }

    .btn-primary {
        padding: 10px 30px;
        font-size: .7rem !important;
        font-weight: 600;
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        /* box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6); */
    }
}

@media (min-width: 100px) and (max-width: 452px) {

    #main-sidebarm {
        display: block;
    }

    .main-header {
        position: relative;
        padding: 5px 0 !important;
    }

    .header-container {
        flex-direction: column !important;
        gap: 3px !important;
        padding: 10px 15px !important;
        width: 100% !important;
        height: 200;
        box-sizing: border-box;
    }

    .logo-area {
        height: auto !important;
        /* إلغاء الارتفاع الثابت 110 */
        font-size: 1.4rem !important;
        /* تصغير حجم اللوجو ليناسب شاشة الموبايل */
        justify-content: center !important;
        width: 100% !important;
        text-align: center;
        margin-bottom: 5px;
    }

    .nav-links {
        gap: 15px !important;
        /* تقليل المسافات بين الروابط */
        flex-wrap: wrap !important;
        /* نزول الروابط لسطر جديد لو المساحة ضيقة */
        justify-content: center !important;
        width: 100% !important;
    }

    .nav-item {
        font-size: 12px !important;
        /* تصغير الخط لتجنب التشوه البصري */
        font-weight: 600;
    }

    .auth-buttons {
        width: 100% !important;
        justify-content: center !important;
        gap: 10px !important;
        margin: 10 0 0 0;
    }

    .btn-text {
        font-size: 0.85rem !important;
        margin: 0 5px !important;
    }

    .btn-primary {
        padding: 8px 10px !important;
        /* تقليل الحشو الداخلي للزر */
        font-size: 0.85rem !important;
        border-radius: 6px !important;
        text-align: center;
    }

    /* 1. منع أي تسريب أفقياً في الحاوية */
    .hero-carousel-section {
        width: 100% !important;
        /* أو 95% بشرط إغلاق overflow */
        box-sizing: border-box !important;
        padding: 25px 0 45px 0 !important;
        /* شيلنا الـ padding الجانبي من الحاوية */
        overflow: hidden !important;
    }

    .hero-slider-track {
        display: flex !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .main-dashboard-layout {
        flex-direction: column;
        gap: 0px;
        padding: 10px;
        width: 100%;
        margin: 0 auto;
    }

    .top-cards-menu {
        gap: 20px;
        width: 100%;
        margin-bottom: 10px;
    }

    .topdynamic-cards {
        align-items: center;
        width: 100%;
        gap: 30px;
        height: auto;
        flex-direction: column-reverse;
    }

    #dynamic-content-workspace {
        width: 100%;
    }

    #dynamic-toggles-container {
        width: 100%;
    }

    .content-workspace {
        display: flex;
        flex-direction: row-reverse;
        gap: 25px;
        width: 100%;
        align-items: center;
        justify-items: center;
    }

    .slider-wrapper {
        width: 100%;
        position: relative;
        align-items: center !important;
        justify-items: center !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 10px !important;
        overflow: unset !important;
    }

    .toggles-container {
        width: 100% !important;
        height: auto !important;
        padding: 15px !important;
    }

    .display-mode-selector {
        display: flex;
        background: var(--lightboby);
        border-radius: 10px;
        padding: 4px;
        margin-bottom: 20px;
        border: 1px solid #333;
    }

    .zoom-controls {
        transform: scale(0.7);
    }

    .slide-item,
    .hero-banner {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px !important;
        /* الحشو الداخلي هنا لحماية العناصر من الأطراف */
        margin: 0 !important;
        /* إلغاء أي مارجين جانبي بيعمل زحزحة */
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 15px !important;
    }

    .hero-text-col,
    .hero-img-col {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .hero-heading {
        line-height: 1.4 !important;
        margin: 0 !important;
        display: block !important;
        width: 100% !important;
        word-wrap: break-word !important;
        font-size: 2.0rem !important;
        height: auto !important;

    }

    .hero-h,
    span.hero-heading.hero-h {
        font-size: 1.2rem !important;
        line-height: 1.4 !important;
        display: block !important;
        position: static !important;
        margin-top: 5px !important;
        margin: 10 0 0 0 !important;
        width: 100% !important;
        text-align: left;
    }

    /* 2. ضبط الحاوية والنصوص داخل عمود النص */
    .hero-text-col {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
        align-items: center !important;
        text-align: center !important;
    }

    /* 3. ضمان منع الطفح الأفقي للنصوص */
    .hero-desc {
        font-size: 0.9rem !important;
        width: 100% !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
    }


    /* 2. ضبط باقي كتل الصفحة والترحيلات اللي كانت بايظة */
    .container,
    .hero-carousel-section,
    .section-container,
    .main-dashboard-layout {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        padding: 15px !important;
        margin: 10px 0 !important;
        box-sizing: border-box;
    }

    /* إلغاء الـ ترحيل بالـ بكسل المكسور في اللغتين للموبايل */
    [lang="ar"] .hero-carousel-section,
    [lang="ar"] .hero-text-col,
    [lang="ar"] .hero-img-col {
        right: 0 !important;
        left: 0 !important;
    }

    .hero-banner {
        flex-direction: column !important;
        /* ترتيب عمودي للـ النص والصورة الإعلانية */
        text-align: center !important;
        height: auto !important;
        gap: 10px;
        margin: 0;
        padding: 0;
        /* background: hotpink; */
    }

    .hero-text-col {
        width: 100% !important;
        right: 0 !important;
        margin: 0;
        padding: 0;
        /* background: rgba(21, 202, 30, 0.705); */
        gap: 0px;
        height: auto !important;

    }

    .btn-hero-action {
        font-size: 1.15rem;
        display: inline-block;
        margin: 10 0 !important;
    }

    .hero-img-col {
        width: 100% !important;
        left: 0 !important;
        justify-content: center !important;
    }

    .hero-img-col img {
        height: auto !important;
        max-height: 250px;
        object-fit: contain;
    }

    .carousel-dots {
        bottom: 12px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        gap: 6px !important;
    }

    .carousel-dots .dot {
        width: 7px !important;
        height: 7px !important;
    }

    .carousel-dots .dot.active {
        width: 20px !important;
        border-radius: 4px !important;
    }


    .q {
        margin: 10 0;
        display: flex;
        flex-direction: column;
    }

    .section-main-title {
        font-size: 1.6rem !important;
        font-weight: 700;
        text-align: center;
        width: 100%;
        margin: 0;
        padding: 0;
        left: 0;
        right: 0;
        letter-spacing: -0.5px;
        /* background: rgba(36, 212, 212, 0.336) */

    }

    .block-title {
        font-size: 2.0rem !important;
        font-weight: 700;
        margin-bottom: 15px;
    }

    .block-desc {
        font-size: 0.9rem !important;
        line-height: 1.6;
        margin-bottom: 25px;
    }

    /* أدوات الذكاء الاصطناعي (أزرار الكروت) */
    .top-cards-menu {
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: center !important;
    }

    .tool-card {
        padding: 10px 15px !important;
        flex: 1 1 calc(50% - 10px);
        /* كارتين جنب بعض في السطر */
        min-width: 120px;
        justify-content: center;
    }

    /* مساحة عمل السلايدر والـ Toggles */

    .slider-button {
        font-size: 14 !important;
        padding: 7 2 !important;
    }

    .slider-button span {
        padding: 5 10 !important;
    }

    .demo-video {
        object-fit: fill !important;
    }

    /* ==================================================== */
    /* 2. حاوية التحكم العايمة (The Floating Bar) */
    /* ==================================================== */
    .video-controls {
        bottom: 20px;
        left: 50%;
        width: 100%;
        padding: 8px 18px;
    }

    /* ستايل الأزرار الموحد داخل المشغل */
    .video-controls button {
        font-size: 12 !important;
        padding: 5 !important;
    }

    /* تنسيق عرض التوقيت الرقمي */
    .time-display {
        font-size: 10 !important;
    }

    /* زر الـ Play/Pause */
    .play-btn {
        font-size: 111 !important;
        padding: 0;
        /* width: 15 !important; */
        height: 25 !important;
        /* background: red !important; */
    }

    /* البلوك الترويجي (Workflow Promo) */
    .workflow-promo-block {
        width: 100% !important;
        flex-direction: column !important;
        height: auto !important;
        padding: 20px 10px !important;
    }

    .workflow-img-side {
        width: 100% !important;
        margin: 15px 0 !important;
    }

    .workflow-text-side {
        padding: 15px !important;
        text-align: center !important;
    }

    /* شبكات التقييمات والأخبار (Grids) */
    .testimonials-masonry,
    .news-grid,
    .business-profiles-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }


    .slider-wrapper.converter-info-bar {
        width: 100% !important;
        /* padding: 50px !important; */
    }

    .demo-slider-container {
        overflow: visible !important;
    }

    /* شريط بيانات تحويل الصيغ العلوى */
    .converter-info-bar {
        background: transparent !important;
        backdrop-filter: blur(0) !important;
        border: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding: 0 !important;
        margin: -50 0;
        width: 100%;
        position: absolute !important;
    }

    .info-left,
    .info-right {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10 !important;

    }

    /* شارات الصيغ المستوحاة من الصورة الأولى */
    .badge-format {
        font-size: 8px !important;
        font-weight: bold;
        padding: 5 !important;
    }

    .badge-format.target-badge {
        /* لون أخضر للصيغة الجديدة المحسنة */
    }

    /* نصوص الأحجام المستوحاة من الصورة الثانية */
    .size-text {
        font-size: 10 !important;

    }

    .size-text.savings {
        /* لون مميز للحجم الصغير المحسن */
    }

    /* تعديل بسيط لحاوية السلايدر لتلتحم مع الشريط العلوي */
    .slider-images-container {
        position: relative;
        border-radius: 0 0 8px 8px;
        overflow: hidden;
    }

    /* Features Grid Mobile (1 column) */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }


    /* الفوتر (Footer) */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        text-align: center !important;
    }

    .footer-brand-col {
        text-align: center !important;
    }

    .footer-brand-col .logo {
        direction: ltr !important;
    }

    .footer-brand-col .logo .logo-text {
        font-size: 3.0rem !important;
        text-align: center !important;

    }

    .brand-subtext {
        font-size: 0.9rem !important;
        line-height: 1;
        text-align: center !important;
        margin-bottom: 0px;
    }

    /* ==========================================================================
       تعديل نصوص حقوق الفوتر (Texts) لتكون بالعرض وجنب بعضها في الموبايل
       ========================================================================== */

    footer .buttom_footer {
        display: flex !important;
        flex-direction: row !important;
        /* إجبار النصوص تفضل بالعرض مش بالطول */
        flex-wrap: wrap !important;
        /* لو الشاشة صغيرة جداً يلموا جوه المساحة بمرونة */
        justify-content: center !important;
        /* التمركز في منتصف الشاشة */
        align-items: center !important;
        gap: 5px !important;
        /* مسافة صغيرة رايقة بين الكلمة والتانية */
        height: auto !important;
        /* يظبط ارتفاعه تلقائي حسب السطر */
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 5px !important;
        box-sizing: border-box;
    }

    html[lang="ar"] footer .buttom_footer {
        justify-content: center !important;
    }

    .t1_1,
    .t1_2,
    .t1_3,
    .t2,
    footer .buttom_footer a,
    footer .buttom_footer .t1 {
        display: inline-block !important;
        /* معاملة الكلمات كقطع بجانب بعضها */
        position: relative !important;
        left: 0 !important;
        /* إلغاء الترحيل القديم اللي كان بيبوظ الأبعاد */
        right: 0 !important;
        white-space: nowrap !important;
        /* يمنع الكلمة الواحدة تنكسر نصين */
        font-size: 0.7rem !important;
        /* حجم خط مناسب جداً ومقروء للموبايل */
        margin: 0 !important;
        width: auto !important;

    }

    html[lang="en"] footer .buttom_footer .t1 {
        margin: 0 !important;
    }

    html[lang="ar"] footer .buttom_footer .t1 {
        margin: 0 !important;
    }


}

@media (min-width: 100px) and (max-width: 375px) {

    .hero-h {
        position: relative;
        bottom: 15 !important;
        left: 0;
        margin: 0;

    }


    .t1_1,
    .t1_2,
    .t1_3,
    .t2,
    footer .buttom_footer a,
    html[lang="en"] footer .buttom_footer .t1 {
        display: inline-block !important;
        /* معاملة الكلمات كقطع بجانب بعضها */
        position: relative !important;
        left: 0 !important;
        /* إلغاء الترحيل القديم اللي كان بيبوظ الأبعاد */
        right: 0 !important;
        white-space: nowrap !important;
        /* يمنع الكلمة الواحدة تنكسر نصين */
        font-size: 7px !important;
        /* حجم خط مناسب جداً ومقروء للموبايل */
        margin: 0 !important;
        width: auto !important;
        /* العرض على قد الكلمة بالظبط */
    }
}

/* ==========================================================================
   تصميم السلكت الجديدة والتحكم في ظهورها عبر الأجهزة
   ========================================================================== */

/* 1. الوضع الافتراضي لشاشات الكمبيوتر (PC): مخفية تماماً ولا تؤثر على التصميم */
.special-feature-select-box {
    display: none !important;
}

/* 2. وضع الآيباد والموبايل: تظهر وتتكيف تلقائياً مع حجم الشاشة */
@media (min-width: 700px) and (max-width: 1120px) {

    .special-feature-select-box {
        display: block !important;
        /* إظهارها فقط على الشاشات الذكية */
        width: 100%;
        margin: 15px 0;
        box-sizing: border-box;
    }

    /* الحاوية الداخلية للسلكت */
    .select-inner-container {
        background: var(--Cards1);
        /* تعتمد على متغيرات الألوان لديك */
        border: 1px solid var(--btn1);
        border-radius: 10px;
        padding: 15px 20px;
        width: 100%;
        display: flex;
        flex-direction: row;
        box-sizing: border-box;
        justify-content: space-evenly;
        align-items: center;
        gap: 15px;
        padding: 30 0;
        font-family: 'Poppins', sans-serif;

    }

    [lang="ar"] .select-inner-container {
        flex-direction: row-reverse;
    }

    /* نص السلكت */
    .select-text-side {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .select-label-tag {
        font-size: 2.4rem !important;
        color: var(--icon1);
        font-weight: bold;
        text-transform: uppercase;
        padding: 10 20;

    }

    .select-main-text {
        font-size: 1.4rem !important;
        color: var(--text);
        margin: 0;
        font-weight: 600;
        padding: 10 20;
    }

    /* زرار تشغيل المودال (الكارت) */
    .trigger-modal-btn {
        background: var(--btn);
        color: var(--text);
        border: none;
        padding: 10px 18px;
        border-radius: 8px;
        font-size: 0.9rem !important;
        font-weight: bold;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: transform 0.2s ease;
        margin: 20;

        white-space: nowrap;
        /* لمنع انقسام نص الزرار على سطرين في الشاشات الصغيرة */
    }

    .trigger-modal-btn:active {
        transform: scale(0.95);
        /* تأثير اللمس على الآيباد والموبايل */
    }



}

/* 3. لمسات إضافية مخصصة لحجم الموبايل الصغير جداً (أقل من 480px) */
@media (min-width: 100px) and (max-width: 452px) {

    .special-feature-select-box {
        display: block !important;
        /* إظهارها فقط على الشاشات الذكية */
        width: 100%;
        margin: 15px 0;
        box-sizing: border-box;
    }

    .select-inner-container {
        padding: 12px 15px;
        background: var(--Cards1);
        /* تعتمد على متغيرات الألوان لديك */
        border: 1px solid var(--btn1);
        border-radius: 10px;
        width: 100%;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        justify-content: space-evenly;
        align-items: center;
        gap: 15px;
        padding: 30 0;
        font-family: 'Poppins', sans-serif;
    }

    [lang="ar"] .select-inner-container {
        flex-direction: row-reverse;
    }

    .select-text-side {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }


    .select-label-tag {
        font-size: 2.3rem !important;
        margin: 5 0;
        color: var(--icon1);
        font-weight: bold;
        text-transform: uppercase;
        padding: 10 20;
    }

    .select-main-text {
        font-size: 0.8rem !important;
        color: var(--text);
        margin: 0;
        font-weight: 600;
        padding: 10 20;
    }

    .trigger-modal-btn {
        background: var(--btn);
        color: var(--text);
        border: none;
        padding: 10px 18px;
        border-radius: 8px;
        font-size: 0.9rem !important;
        font-weight: bold;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: transform 0.2s ease;
        margin: 20;

        white-space: nowrap;
        /* لمنع انقسام نص الزرار على سطرين في الشاشات الصغيرة */
    }

    .trigger-modal-btn:active {
        transform: scale(0.95);
        /* تأثير اللمس على الآيباد والموبايل */
    }

}